package com.datalayer.orm;

import com.container.app.annotations.Component;

import java.lang.annotation.AnnotationTypeMismatchException;
import java.lang.annotation.IncompleteAnnotationException;
import java.sql.SQLException;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Georgiana.Scarlat
 * Date: 7/9/12
 * Time: 6:42 PM
 */
@Component
public interface DBQuery {

    public String getSQLQuery() throws SQLException, IncompleteAnnotationException, IllegalArgumentException;

    public List getQueryResults() throws UnsupportedOperationException, IncompleteAnnotationException, AnnotationTypeMismatchException;

    public void makeUpdate() throws SQLException, IllegalArgumentException, IncompleteAnnotationException;

    public <T> List<T> getQueryHomogeneousResults(Class<T> resultType) throws UnsupportedOperationException, AnnotationTypeMismatchException;

}
